package com.car.serve.client;

import com.car.commons.core.model.Result;
import com.car.serve.client.dto.AdminDto;
import com.car.serve.client.dto.findByUserIdDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "car-account", path = "/account")
public interface UserClient {
    /**
     * 根据用户ID查找用户信息
     * 返回用户姓名
     */
    @GetMapping("/user/findUserById/{userId}.ty")
    public Result<findByUserIdDto> findUserById(@RequestParam("userId") Integer userId);
    @GetMapping("/admin/selectAdminDto")
    public Result<AdminDto> selectAdminDto(@RequestParam("adminId") Integer adminId);
    /**
     * 根据店家ID查找用户信息状态是否正常
     *
     */
    @GetMapping("/stores/judgmentClerkState.ty")
    public Result findClerkById();


    @GetMapping("stores/findStoresIdByClerkId.ty")
    @ApiOperation(value = "通过店员id返回门店id")
    public Result<Integer> findStoresIdByClerkId(@RequestParam("clerkId") Integer clerkId);

}
